//
//  LHAppAuthorizationManager.h
//  LHAppAuthorizationManager
//
//  Created by Apple on 2017/12/8.
//  Copyright © 2017年 yxkj. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <Photos/Photos.h>
#import <CoreLocation/CoreLocation.h>
@interface LHAppAuthorizationManager : NSObject
/**
 向用户请求使用相册的权限
 typedef NS_ENUM(NSInteger, PHAuthorizationStatus) {
 PHAuthorizationStatusNotDetermined = 0,  User has not yet made a choice with regards to this application
 PHAuthorizationStatusRestricted,         This application is not authorized to access photo data.
 The user cannot change this application’s status, possibly due to active restrictions
 such as parental controls being in place.
 PHAuthorizationStatusDenied,             User has explicitly denied this application access to photos data.
 PHAuthorizationStatusAuthorized          User has authorized this application to access photos data.
 } PHOTOS_AVAILABLE_IOS_TVOS(8_0, 10_0);
 @param completion 请求结果回调
 */
+ (void)lh_requestUserAuthorizationPhotosWith:(void(^)(PHAuthorizationStatus status))completion;
/**
 向用户请求使用相机的权限(ios7及以上系统可用)
 typedef NS_ENUM(NSInteger, AVAuthorizationStatus) {
 AVAuthorizationStatusNotDetermined = 0,
 AVAuthorizationStatusRestricted    = 1,
 AVAuthorizationStatusDenied        = 2,
 AVAuthorizationStatusAuthorized    = 3,
 } NS_AVAILABLE_IOS(7_0) __TVOS_PROHIBITED;
 
 @param grantedBlock 结果回调
 */
+ (void)lh_requestUserAuthorizationCameraWith:(void(^)(AVAuthorizationStatus status))grantedBlock;

/**
 向用户请求使用地理位置的权限
 typedef NS_ENUM(int, CLAuthorizationStatus) {
 kCLAuthorizationStatusNotDetermined = 0,
 kCLAuthorizationStatusRestricted,
 kCLAuthorizationStatusDenied,
 kCLAuthorizationStatusAuthorizedAlways NS_ENUM_AVAILABLE(10_12, 8_0),
 kCLAuthorizationStatusAuthorizedWhenInUse NS_ENUM_AVAILABLE(NA, 8_0),
 kCLAuthorizationStatusAuthorized NS_ENUM_DEPRECATED(10_6, NA, 2_0, 8_0, "Use kCLAuthorizationStatusAuthorizedAlways") __TVOS_PROHIBITED __WATCHOS_PROHIBITED = kCLAuthorizationStatusAuthorizedAlways
 };
 */
+(CLAuthorizationStatus)lh_requestUserAuthorizationLocation;
@end
